<template>
  <div class="index-window border-shadow">
    <p class="quick-t"><i class="el-icon-document"></i>余额提醒
        <el-button class="read-all" type="text" @click="dialogTodo = true">查看全部</el-button>
        <el-dialog title="余额提醒" :visible.sync="dialogTodo">
        <div>
            <el-table :data="gridData">
                <el-table-column property="eText" label="日期" width="150"></el-table-column>
                <el-table-column property="eSelect" label="姓名" width="200"></el-table-column>
                <el-table-column property="eStartTime" label="日期"></el-table-column>
            </el-table>
            <el-col :span="24" class="toolbar">
                <el-pagination style="float:right" @size-change="handleSizeChange"
                    @current-change="handleCurrentChange"
                    :current-page="currentpage"
                    :page-sizes="[10, 20, 50, 100]"
                    :page-size="number"
                    layout="total, sizes, prev, pager, next, jumper"
                    :total="total">
                </el-pagination>
            </el-col>
        </div>
        </el-dialog>
    </p>
    <div class="window-box" style="display:block;padding:0 15px;">
        <el-table
      :data="gridData"
      style="width: 100%">
      <el-table-column
        prop="eStartTime"
        label="日期"
        width="180">
      </el-table-column>
      <el-table-column
        prop="eText"
        label="姓名"
        width="180">
      </el-table-column>
      <el-table-column
        prop="eSelect"
        label="地址">
      </el-table-column>
    </el-table>
    </div>
    </div>
</template>
<style lang='scss'>
  /*引入无须编译的css文件*/
  @import '../../../assets/index.scss';
</style>
<script>
import axios from 'axios'
import { getDemoListPage } from '@/api/api';
  export default {
    data () { 
        return { 
        dialogTodo: false,
        gridData: [], 
        currentpage:1, 
        filters: { //查询条件
				eText: '',
				eSelectId: ''
			},
        number:10, 
        total:7,
        } 
    }, 
    methods: {
    getDemo() {//获取列表数据
        var _this = this;
        let para = { //参数
            currentpage:this.currentpage,
            number:this.number,
            eSelectId:this.filters.eSelectId ? this.filters.eSelectId:0,
			eText: this.filters.eText,
            
        };
        getDemoListPage(para).then((res) => {
            console.log("待办事项")
            console.log(res.data.result.row);
            _this.gridData =res.data.result.row; 
            _this.total = res.data.result.total
        });
    },
    handleSizeChange: function (size) { 
        this.number = size; 
        this.getDemo();
    }, 
    handleCurrentChange: function(currentpage){ 
        this.currentpage = currentpage;
        this.getDemo(); 
    }
    },
    mounted(){
      this.getDemo()
    } 
  };
</script>